package com.pp.web;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@SpringBootApplication
@MapperScan("com.pp.web.mapper")
public class PPWebApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(PPWebApplication.class, args);
        System.out.println("----------- Spring Boot 已启动 -------------");
    }

    /**
     * 配置当前启动类，使得 war 包也能在 Tomcat 下使用
     */
    @Override
    public SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(PPWebApplication.class);
    }

}
